package it.avantsoft.ls.base;

public interface Protocol {
    byte WELCOME = 1;
    byte NEW_CHILD = 2;
    byte ACK_NEW_CHILD = 3;
    byte CONNECT_TO = 4;
    byte CONNECT = 5;
    byte ADDRESS_BOOK = 6;
    //
    byte PING = 7;
    byte PONG = 8;
    byte RECONNECT = 9;
    byte RETRY_CONNECTION = 10;
    //
    byte APPRAISAL = 15;
    byte HORIZONTAL_BALANCE = 16;
    byte EXCHANGEABLE_PEER = 17;
    byte NEWBROTHER = 18;
    byte NEWUNCLE = 19;
    byte NEWSON = 20;
    byte NEWNIECE = 21;
    byte DEADSON = 22;
    byte DEADUNCLE = 23;
    byte DEADBROTHER = 24;
    byte DEADNIECE = 25;
    byte UPGRADENIECE = 26;
    byte UPGRADEBROTHER = 27;
    byte DOWNGRADEBROTHER = 28;
    byte DOWNGRADEUNCLE = 29;
    byte HORIZONTALEXCHANGEABLEPEER = 30;
    byte ACKHORIZONTALBALANCEMESSAGE = 31;

    //
    enum ABProtocol {
        NOTINIZIALIZED,
        INITIALIZED,
        HBALANCEDETECTED,
        VBALANCEDETECTED
    }
}
